package com.bootdo.hjh.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bootdo.hjh.dao.BankCardMapper;
import com.bootdo.hjh.domain.BankCard;
import com.bootdo.hjh.service.BankCardService;

@Service
public class BankCardServiceImpl implements BankCardService{

	@Autowired
	private BankCardMapper bankCardMapper;
	
	@Override
	public Integer addBankCard(BankCard bankCard) {
		
		return bankCardMapper.addBankCard(bankCard);
	}

	@Override
	public Integer updateBankCard(BankCard bankCard) {
		bankCardMapper.modifyBankCard(bankCard);
		return null;
	}

	@Override
	public Integer deleteBankCard(Integer bankCardId) {
		bankCardMapper.deleteBankCard(bankCardId);
		return null;
	}

	@Override
	public List<BankCard> list(Long userId) {
		
		return bankCardMapper.getBankCardForAll(userId);
	}

	@Override
	public BankCard get(Integer id) {
		return bankCardMapper.getBankCardById(id);
	}
	
	

}
